//分机号
public class B_1 {
    public static void main(String[] args) {
        int t = 0;
        for (int i = 0;i<=9;i++)
            for (int j = 0;j<=9;j++)
                for (int k = 0;k<=9;k++)
                    if (i>j&&j>k)
                        t++;
        System.out.println(t);
    }
}
